<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
     <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>{{ tag.title }}_{{ config.SITE_NAME }}</title>
    <meta name="keywords" content="{{ tag.keyword }}"/>
    <meta name="description" content="{{ tag.description }}"/>
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
    <link rel="stylesheet" href="{{ url_for('home.static', filename='bulma/css/bulma.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('home.static', filename='style.css') }}">
</head>
<body>

{% include 'default/_nav.html' %}
<section class="hero is-primary hero-pic">
    <div class="hero-body">
        <div class="container">
            <span class="category">tag</span>
            <p class="title is-2">{{ tag.name }}</p>
            {% if tag.description %}<p>{{ tag.description }}</p>{% endif %}
        </div>
    </div>
</section>

<div class="container main">
    {% for item in range(0, record|length) %}
    {% if loop.first or loop.index0 % 4 == 0 %}
    <div class="columns">
        {% for item in record[loop.index0: loop.index0+4] %}
        <div class="column is-3">
            {%- if item.thumbnail -%}
            <a class="good" href="{{ item.url }}" title="{{ item.title }}">
                <div class="card">
                    <div class="card-image">
                        <figure class="image is-3by2">
                            <img src="{{ item.thumbnail|default('https://www.kanhebei.cn/static/logo.png', True) }}"
                                 alt="{{ item.title }}">
                        </figure>
                    </div>
                    <div class="card-content">
                        <p class="title is-6">{{ item.title }}</p>
                    </div>
                </div>
            </a>
            {% else %}
            <a class="good" href="{{ item.url }}" title="{{ item.title }}">
                <div class="card">
                    <div class="card-content">
                        <p class="title is-5 is-spaced">{{ item.title }}</p>
                        <p class="subtitle is-size-6 is-spaced">{{ item.description }}</p>
                        <p class="subtitle is-size-6 is-spaced">{{ item.source }}</p>
                        <time datetime="2016-1-1">{{ item.create_datetime }}</time>
                    </div>
                </div>
            </a>
            {% endif %}
        </div>
        {% endfor %}
    </div>
    {% endif %}
    {% endfor %}

    {% from 'default/macros/paginate.html' import render_pagination %}
    {{ render_pagination(pagination,prev='上页',next='下页') }}
</div>


<footer class="footer" style="padding:1.5rem 1rem 2rem 1rem; margin-top:1.5rem">
    <div class="container content has-text-centered">
        <p>空谈误国，实干兴邦</p>
        <p>技术支持: 河北鼎道网络技术有限公司</p>
        <p> {%- if g.site_icp -%}
            <a class="button is-light is-small" rel="nofollow" href="http://www.beian.miit.gov.cn/">{{ g.site_icp }}</a>
            {%- endif -%}
            {%- if g.site_gwab -%}
            <a class="button is-light is-small" style="margin-left: 10px;" rel="nofollow"
               href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ g.site_gwab }}">{{ g.site_gwab
                }}</a>
            {%- endif -%}
        </p>
        <p class="title is-6">{{ config.SITE_NAME }}</p>
    </div>
</footer>
</body>
</html>